package com.example.demo.repository;

import com.example.demo.model.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
public interface StudentRepository extends JpaRepository<Student, Integer> {
    List<Student> findByName(String name);
    @Query(nativeQuery = true, value = "select * from student where name like ?%")
    List<Student> findByNativeQuery(String name);

    List<Student> findByTel(String tel);
}